export ARGO_WORKFLOWS_VERSION=$(curl -s https://api.github.com/repos/argoproj/argo-workflows/tags | jq -r '.[0].name')

kubectl create namespace argo
# kubectl apply -n argo -f https://ghproxy.net/https://github.com/argoproj/argo-workflows/releases/download/$workflow_version/install.yaml
kubectl apply -n argo -f "https://github.com/argoproj/argo-workflows/releases/download/${ARGO_WORKFLOWS_VERSION}/quick-start-minimal.yaml"
kubectl apply -f ingress-argoworkflow.yaml

# kubectl patch deployment \
#   argo-server \
#   --namespace argo \
#   --type='json' \
#   -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args", "value": [
#   "server",
#   "--auth-mode=server"
# ]}]'

# kubectl apply -n argo -f https://raw.fastgit.org/argoproj/argo-workflows/master/manifests/quick-start-postgres.yaml

# kubectl -n argo port-forward deployment/argo-server 2746:2746
